<template>
  <div class="app-container">
    <div style="text-align: right">
      <el-button @click="onCancel">返回</el-button>
    </div>

    <el-card class="mt20 box-card">
      <div slot="header" class="clearfix">
        <span>职级详情</span>
      </div>
      <el-descriptions :column="3" size="medium">
        <el-descriptions-item label="职级名称">{{info.rankName}}</el-descriptions-item>
        <el-descriptions-item label="工资标准">{{info.wageStandard}}元</el-descriptions-item>
        <el-descriptions-item label="基本工资">{{info.basePay}}元</el-descriptions-item>

        <el-descriptions-item label="岗位工资">{{info.postWage}}元</el-descriptions-item>
        <el-descriptions-item label="职级补贴">{{info.rankSubsidy}}元</el-descriptions-item>
        <el-descriptions-item label="月度绩效">{{info.monthlyPerformance}}元</el-descriptions-item>

        <el-descriptions-item label="全勤奖">{{info.fullAttendanceReward}}元</el-descriptions-item>
        <el-descriptions-item label="住房补贴">{{info.housingAllowance}}元</el-descriptions-item>
        <el-descriptions-item label="医保基数">{{info.medicalInsuranceBase}}元</el-descriptions-item>

        <el-descriptions-item label="医保比例">{{info.proportionOfMedicalInsurance}}%</el-descriptions-item>
        <el-descriptions-item label="养老基数">{{info.pensionBase}}元</el-descriptions-item>
        <el-descriptions-item label="养老比例">{{info.proportionOfEndowmentInsurance}}%</el-descriptions-item>

<!--        <el-descriptions-item label="生育比例">{{info.proportionOfMaternityInsurance}}%</el-descriptions-item>-->
        <el-descriptions-item label="失业比例">{{info.proportionOfUnemploymentInsurance}}%</el-descriptions-item>
        <el-descriptions-item label="医疗保险">{{info.medicalInsurance}}元</el-descriptions-item>

<!--        <el-descriptions-item label="生育保险">{{info.maternityInsurance}}元</el-descriptions-item>-->
        <el-descriptions-item label="养老保险">{{info.endowmentInsurance}}元</el-descriptions-item>
        <el-descriptions-item label="失业保险">{{info.unemploymentInsurance}}元</el-descriptions-item>
        <el-descriptions-item label="个人代扣合计">{{info.individualTotal}}元</el-descriptions-item>
      </el-descriptions>
    </el-card>

  </div>
</template>

<script>
  export default {
    data(){
      return {
        info: {},  //基本信息
      }
    },
    created(){
      const params = this.$route.query;
      if(params&&params.id){
        console.log(params)
        // 详情数据
        this.getRankDetail(params)
      }
    },
    methods: {
      onCancel() {
        this.$router.replace({path:"/basic/rank"});
      },
      //获取详情信息
      getRankDetail(params){
        this.info = params
      },
    }
  }
</script>
